    <style type="text/css">
        .crontab, .keywords{display:none;}
    </style>
    <form action="" method="POST" id="myform">
        {{csrf_field()}}
        <div class="box-body">
            <div class="form-group">
                <label>消息内容：</label>
                <textarea name="content" class="form-control" rows="10" style="resize: none"></textarea>
            </div>
            <span id="err_content" style="color:red"></span>
        </div>
        <div class="box-body">
            <div class="form-group">
                <label>消息类型：</label>
                <input class="push-type" type="radio" name="type" value="1" checked>循环推送
                <input class="push-type" type="radio" name="type" value="2">定时推送
                <input class="push-type" type="radio" name="type" value="3">关键字回复
            </div>
            <span id="err_content" style="color:red"></span>
        </div>

        <div class="box-body cycle">
            <div class="form-group">
                <label>推送起始时间：</label>
                <input type="text" name="begin_time" class="form-control">
            </div>
            <span id="err_begin_time" style="color:red"></span>
        </div>
        <div class="box-body cycle">
            <div class="form-group">
                <label>推送终止时间：</label>
                <input type="text" name="end_time" class="form-control">
            </div>
            <span id="err_end_time" style="color:red"></span>
        </div>
        <div class="box-body cycle">
            <div class="form-group">
                <label>推送间隔(分)：</label>
                <input type="text" name="interval" class="form-control">
            </div>
            <span id="err_interval" style="color:red"></span>
        </div>

        <div class="box-body crontab">
            <div class="form-group">
                <label>推送时间：</label>
                <input type="text" name="crontab" class="form-control">
            </div>
            <span id="err_crontab" style="color:red"></span>
        </div>

        <div class="box-body keywords">
            <div class="form-group">
                <label>关键字：</label>
                <input type="text" name="keywords" class="form-control">
            </div>
            <span id="err_keywords" style="color:red"></span>
        </div>

    </form>
    <script type="text/javascript">
        $('.push-type').change(function(){
           var type = $("input[name='type']:checked").val();
           if (type == 1) {//循环推送
                $('.cycle').show();
                $('.crontab').hide();
                $('.keywords').hide();
           } else if (type == 2) {//定时推送
                $('.crontab').show();
                $('.cycle').hide();
                $('.keywords').hide();
           } else {//关键字回复
                $('.keywords').show();
                $('.crontab').hide();
                $('.cycle').hide();
           }    
        });
    </script>